﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MaterialInventoryShow.aspx.cs" Inherits="weba.Sales.MaterialInventoryShow" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
         <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td height="30" background="../Images/tab_05.gif">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td width="12" height="30">
                                <img src="../Images/tab_03.gif" width="12" height="30" />
                            </td>
                            <td>
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td width="46%" valign="middle">
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td>
                                                        <div align="center">
                                                            <img src="../images/tb.gif" width="16" height="16" /></div>
                                                    </td>
                                                    <td width="95%">
                                                        <span class="titleBold12px">查看库存</span>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                        <td width="54%" align="right">
                                        </td>
                                    </tr>
                                </table>
                            </td>
                            <td width="16" height="30">
                                <img src="../Images/tab_07.gif" width="16" height="30" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td>
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td width="8" background="../images/tab_12.gif">
                                &nbsp;
                            </td>
                            <td align="center">
                                <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
                                    <ProgressTemplate>
                                        <img src="../Images/ajax-loader.gif" alt="" />数据载入中，请稍候...
                                    </ProgressTemplate>
                                </asp:UpdateProgress>
                                <br />
                                <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                                    <ContentTemplate>
                                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                            <tr>
                                                <td align="center">
                                                    <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
                                                        <tr>
                                                            <td align="left">
                                                            </td>
                                                        </tr>
                                                        <tr>
                                                            <td align="right">
                                                                <asp:Label ID="lblStrWhere" runat="server" Visible="False"></asp:Label>
                                                                <asp:Label ID="lblRootDepartmentID" runat="server" Visible="False"></asp:Label>
                                                                <br />
                                                                材料名称：<asp:TextBox ID="txtName" runat="server"></asp:TextBox>
                                          
                                                                材料类型：<asp:DropDownList ID="ddlMaterialCategoryID" runat="server">
                                                                </asp:DropDownList>
                                                                所属仓库：<asp:DropDownList ID="ddlLocationID" runat="server">
                                                                </asp:DropDownList>
                                                                &nbsp;<br />
                                                                <asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="查询" />
                                                                分页页数：<asp:TextBox ID="txtPageSize" runat="server" Width="50px"></asp:TextBox>
                                                          
                                                                <asp:Button ID="btnSetPageSize" runat="server" Text="确定" OnClick="btnSetPageSize_Click" />
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="center">
                                                    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                                                        <tr>
                                                            <td width="80%">
                                                               
                                                            </td>
                                                        </tr>
                                                    </table>
                                                    <asp:GridView ID="myGridView" runat="server" AutoGenerateColumns="False" Width="98%"
                                                        DataKeyNames="RecordID,MaterialID,LocationID" 
                                                        OnRowDataBound="myGridView_RowDataBound" 
                                                        onrowcancelingedit="myGridView_RowCancelingEdit" 
                                                        onrowediting="myGridView_RowEditing" onrowupdating="myGridView_RowUpdating">
                                                        <Columns>
                                                            <asp:BoundField DataField="RecordID" HeaderText="ID" ReadOnly="True">
                                                                <ItemStyle Width="50px" />
                                                            </asp:BoundField>
                                                            <asp:TemplateField HeaderText="材料名称">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblMaterialName" runat="server"></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="材料类型">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblMaterialCategoryName" runat="server"></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="所在仓库">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblLocationName" runat="server"></asp:Label>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="库存数量">
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblQuantity" runat="server" Text='<%# Bind("Quantity") %>'></asp:Label>
                                                                </ItemTemplate>
                                                                <EditItemTemplate>
                                                                    <asp:TextBox ID="txtQuantity" runat="server" Text='<%# Bind("Quantity") %>'></asp:TextBox>
                                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="txtQuantity"
                                                            Display="Dynamic" ErrorMessage="请输入数量" SetFocusOnError="True" ValidationGroup="edit"></asp:RequiredFieldValidator>
                                                        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" ValidationGroup="edit"
                                                            runat="server" ErrorMessage="只能输入整数或小数" ValidationExpression="^(\d)+(\.\d+)?$"
                                                            ControlToValidate="txtQuantity"></asp:RegularExpressionValidator>
                                                                </EditItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:CommandField ShowEditButton="True" ValidationGroup="edit" />
                                                        </Columns>
                                                    </asp:GridView>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                  
                                                </td>
                                            </tr>
                                        </table>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </td>
                            <td width="8" background="../images/tab_15.gif">
                                &nbsp;
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td height="35" background="../images/tab_19.gif">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td width="12" height="35">
                                <img src="../images/tab_18.gif" width="12" height="35" />
                            </td>
                            <td align="center">
                                &nbsp;
                            </td>
                            <td width="16">
                                <img src="../images/tab_20.gif" width="16" height="35" />
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
